﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Kaesoft.Hospedaje.Entities;

namespace Kaesoft.Hospedaje.Common
{
    public class BuscadorViewModel : ViewModelBase
    {
        private string _pantallaInteraccion;
        private List<CatalogoSummary> _criterios;
        private CatalogoSummary _criterioSeleccionado;
        private RelayCommand _buscarCommand;

        public RelayCommand BuscarCommand
        {
            get
            {
                return _buscarCommand ?? (_buscarCommand = new RelayCommand(BuscarMethod));
            }
        }

        private void BuscarMethod(object param)
        {
            switch (PantallaInteraccion)
            {
                case"":
                    break;
            }
        }
        

        public CatalogoSummary CriterioSeleccionado
        {
            get { return _criterioSeleccionado; }
            set
            {
                if (_criterioSeleccionado != value)
                {
                    _criterioSeleccionado = value;
                    OnPropertyChanged("CriterioSeleccionado");
                }
            }
        }

        public List<CatalogoSummary> Criterios
        {
            get { return _criterios; }
            set
            {
                if (_criterios != value)
                {
                    _criterios = value;
                    OnPropertyChanged("Criterios");
                }
            }
        }
        
        public string PantallaInteraccion
        {
            get { return _pantallaInteraccion; }
            set
            {
                if (_pantallaInteraccion != value)
                {
                    _pantallaInteraccion = value;
                    OnPropertyChanged("PantallaInteraccion");
                }
            }
        }
        
        public BuscadorViewModel()
        {
            CargaCatalogos();
        }

        private void CargaCatalogos()
        {
            Criterios = Caching.Instancia.Catalogos(TipoCatalogo.TIPOBUSQUEDA);
        }

        public void InicializaPaginaOrigen(string pantallaOrigen)
        {
            PantallaInteraccion = pantallaOrigen;
        }
    }
}
